<?php /* Smarty version 2.6.18, created on 2009-11-19 00:17:42
         compiled from exporterorssummary.tpl */ ?>
<form name="mainForm" method="POST" id="mainForm">
<?php if (! $this->_tpl_vars['search']): ?>
	<style type="text/css"> 
		<?php echo '
			#f_div { display:none; position:absolute; z-index:2} 
			#t_div { display:none; position:absolute; z-index:1} 
		'; ?>

	</style>
	<script type="text/javascript">	
		var calendar1 = new ekimo_calendar("f_show","f_date","Date From", "f_div");
		var calendar1 = new ekimo_calendar("t_show","t_date","Date To", "t_div");
	</script>
    	<h1>Exporter ORS Summary</h1>
        <div class="blue">
        <div class="right">
        	<a href="javascript:void(0);" onclick="showsearch('search');">
			<img id="show_arrow" alt="Show Search" src="/app/default/www/images/arrow-up.png" border="0"/>
			</a>
		</div>
		<p class="left"><div style="display:block;" id="search">
			<table border="0" width="100%">
				<tr>
					<td width="40%"><table border="0" width="100%">
						<tr>
							<td width="15%">Country:</td>
							<td>
								<select name="search[country]" onchange="selectFma();">
										<option value="">--- Select Country ---</option>
									<?php $_from = $this->_tpl_vars['country']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
										<option value="<?php echo $this->_tpl_vars['item']['country_code']; ?>
"><?php echo $this->_tpl_vars['item']['country']; ?>
</option>
									<?php endforeach; endif; unset($_from); ?>
								</select>
							</td>
						</tr>
						<tr>
							<td>Exporter:</td>
							<td id="fma" ><select name="search[fma]">
									<option value="">--- Select Exporter ---</option>
									<?php $_from = $this->_tpl_vars['supplier']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['suppitem']):
?>
										<option value="<?php echo $this->_tpl_vars['suppitem']['org_id']; ?>
"><?php echo $this->_tpl_vars['suppitem']['name']; ?>
</option>
									<?php endforeach; endif; unset($_from); ?>
							</select></td>
						</tr>
						<tr>
							<td>Date From:</td>
							<td>
								<label for="f_date">
									<input type="text" name="search[date_from]" id="f_date" readonly="true">
									<a href="javascript:void(0);" id="f_show"><img alt="Calendar" src="/app/default/www/images/calendar.jpg" border="0"/></a>
									<div id="f_div"></div>
								</label>
							</td>
						</tr>
						<tr>
							<td>Date To:</td>
							<td>
								<label for="t_date">
									<input type="text" name="search[date_to]" id="t_date" readonly="true">
									<a href="javascript:void(0);" id="t_show"><img alt="Calendar" src="/app/default/www/images/calendar.jpg" border="0"/></a>
									<div id="t_div"></div>
									&nbsp;&nbsp;
									<input type="button" value="Generate Report" onclick="doajaxAction('/admin/exporterorssummaryResult',1,'results',document.getElementById('mainForm'))"></td>
								</label>
						</tr>
					</table></td>
				</tr>
			</table>
		</div></p>
        
        </div><?php endif; ?>
           
            <div id="results">
			      
            </div>
</form>
<script language="javascript">
<?php echo '
	function showsearch(div) {
		//alert(\'hee\');
		divid = document.getElementById(div);
		if(divid.style.display == \'none\') {
			divid.style.display = \'block\';
			document.getElementById(\'show_arrow\').src = "/app/default/www/images/arrow-up.png";
		} else {
			divid.style.display = \'none\';
			document.getElementById(\'show_arrow\').src = "/app/default/www/images/arrow-down.png";
		}
	}
	
	function selectFma(){
		doajaxAction("/admin/selectExporter",1,\'fma\',document.getElementById(\'mainForm\'));
	}
'; ?>

</script>

            